package com.plankton

import com.jsdroid.script.JsDroidScript

/**
 * 单例模式提供脚本内置函数接口供其他调用
 */
class Script {

    private static JsDroidScript script = null;

    private Script() {};

    static JsDroidScript getInstance() {
        if (script == null) {
            synchronized (Script.class) {
                if (script == null) {
                    script = new JsDroidScript() {
                        @Override
                        Object run() {
                            return null
                        }
                    }
                }
            }
        }
        return script;
    }

}
